<?php
/**
 * CreateTime: 2022/6/22 15:17
 */

namespace App\Models\Log;

use App\Consts\TableConsts\TableConsts;
use App\Models\BaseModel;

class LoginLog  extends BaseModel
{
    protected $table = TableConsts::CY_LOGIN_LOG_TABLE_NAME;

    public function add($data){
        return $this->insertGetId($data);
    }

    public function getStaffLoginLog($staffId,$filters,$pageSize,$select =["*"]){
        return $this
            ->select($select)
            ->where('staff_id',$staffId)
            ->latest()
            ->Paginate($pageSize);
    }
}